package com.leyou.user.clent;

import com.leyou.user.dto.AddressDTO;
import com.leyou.user.dto.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author syf
 * @version 1.0
 * @date 2019/08/13 21:43
 * @Description TODO:
 */
@FeignClient("user-service")
public interface UserClient {
    //根据用户名和密码查询用户
    @GetMapping("/query")
    public UserDTO findByUsernameAndPassword(@RequestParam("username") String username,
                                                             @RequestParam("password") String password);


    @GetMapping("/address")
    public AddressDTO queryAddressById(@RequestParam("userId") Long userId, @RequestParam("id") Long id);
}
